package com.jzd1997.lesson20;

/**
 * @Author: jiangzd
 * @Date: 10:39 2019/7/26
 */
public class HungrySingleton {
    private static HungrySingleton logger;

    private HungrySingleton(){
        System.out.println("生成HungrySingleton实例一次！");
    }

    public static HungrySingleton getInstance() {
        if(logger==null){
            logger = new HungrySingleton();
        }
        return logger;
    }
}
